home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
comm2
/
varknet2.lha
/
NET2.lha
/
AmiTCP-4.0
/
S
/
add-hotlist.www
next >
Wrap
Text File
|
1994-06-14
|
1KB
|
55 lines
/*
* A QAD hack to keep a hotlist for Amiga Mosaic 1.2.
*
* Copyright 1994, Mike W. Meyer
*/
/* Argument parsing - what there is of it */
parse arg infile outfile
if infile = "" then infile = "envarc:Mosaic/hotlist.html"
if outfile = "" then outfile = "env:Mosaic/hotlist.html"
/* Get the line to be added */
options results
'get url'
url = result
'fetch title'
new = '<MENU><A HREF="'url'">'result'</A>'
/* Get my two file handles */
nofile = ~open(infile, infile, 'Read')
if ~open(outfile, outfile, 'Write') then exit 10
/*
* Copy (or create) the header. Everything up to the first blank line
* in the input file is header, and left alone.
*/
if nofile then do
call writeln outfile, "<HTML><HEAD><TITLE>Hotlist</TITLE></HEAD>" ,
"<BODY><H1>Pages of interest</H1><MENU>"
call writeln outfile, ""
end
else
do until line = ""
line = readln(infile)
call writeln outfile, line
end
/* Add the new line */
call writeln outfile, new
/* Now copy the rest */
if nofile then
call writeln outfile, "</MENU></BODY></HTML>"
else
do until eof(infile)
line = readln(infile)
call writeln outfile, line
end
/* Clean up, and copy outfile back to infile */
call close outfile
call close infile
address command 'copy' outfile infile
exit 0